/**
 * 
 */
package com.maohi.software.arii.utils;

import java.util.Map;

import com.maohi.software.arii.jaxb2.Plugin;
import com.maohi.software.arii.jaxb2.Plugin.Dependencies.Dependency;

/**
 * @author heifara
 * 
 */
public class Plugins {

	/**
	 * Return the key for <b>aDependency</b> used in the {@link Map} <
	 * {@link String},{@link Plugin}>
	 * 
	 * @param aDependency
	 *            the dependency
	 * 
	 * @return the key
	 */
	public static String getKey(Dependency aDependency) {
		return String.format("%s.%s", aDependency.getGroupId(), aDependency.getArtifactId());
	}

	/**
	 * Return the key for <b>aPlugin</b> used in the {@link Map} <{@link String}
	 * ,{@link Plugin}>
	 * 
	 * @param aPlugin
	 *            the plugin
	 * @return the key
	 */
	public static String getKey(Plugin aPlugin) {
		return String.format("%s.%s", aPlugin.getGroupId(), aPlugin.getArtifactId());
	}

}
